#include <stdio.h>
int ReadMatrixAndAverage(int matrix[][3])
{	 	     	 	 	   
    int  average = 0;
    int i, j;
    printf("please input 3*3 matrix\n");
    for (i = 0; i < 3; i++) //1
    {	 	     	 	 	   
        for (j = 0; j < 3; j++) //1
        {	 	     	 	 	   
            scanf("%d", &matrix[i][j]); //1
            average += matrix[i][j]; //1
        }

    }
    return average / 9;//1
}	 	     	 	 	   
void PrintAboveAver(int matrix[][3], int average)
{	 	     	 	 	   
    int i, j;
    for (i = 0; i < 3; i++) //1
    {	 	     	 	 	   
        for (j = 0; j < 3; j++) //1
        {	 	     	 	 	   
            if (matrix[i][j] >= average) //1
            {	 	     	 	 	   
                printf("%4d", matrix[i][j]); //1
            }
        }

    }
}	 	     	 	 	   
int main()
{	 	     	 	 	   
    int matrix[3][3];
    int average;
    average = ReadMatrixAndAverage(matrix); //1
    printf("aver = %d\n", average); //1
    PrintAboveAver(matrix, average); //1
    return 0;
}